<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../link/heat.jsp" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/bootstrap.css"/>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/addBook.css"/>
    <script type="text/javascript" src="${pageContext.request.contextPath }/static/js/ajaxfileupload.js"></script>
</head>
<body>
<!--取出上一个页面上带来的page的值-->


<div id="addAll">
    <div id="nav">
        <p>汽车入库信息详情</p>
    </div>
    <%-- String carLogo;String carNumber;carTime;carZuo;carColor; carPrice; carPhoto; carStatus;--%>
    <div id="table">
        <form action="#"
              method="post" id="myform">

            <%--     、 private String carInId;、

private String carOutId;

private String carCheckId;
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date carInTime;

private Double carInOil;

private Short carInMoney;

private String carInFeedback;

private String userId;

private String carId;--%>
            <h5>入库订单信息</h5>
            <c:if test="${empty carIn}">
                <font style="color: red">没有入库订单信息</font>
            </c:if>
            <c:if test="${not empty carIn}">
                <table>
                    <!--错误提示-->
                    <tr class="three">
                        <td class="four"></td>
                        <td><span id="pnameerr"></span></td>
                    </tr>
                    <tr>
                        <td class="one">出库编号</td>
                        <td><input type="text" name="carInId" class="two" value="${requestScope.carIn.carInId}"></td>
                    </tr>
                    <tr>
                        <td class="one">入库时间</td>
                        <td><input type="date" name="carInTime" class="two"
                                   value="<fmt:formatDate value="${requestScope.carIn.carInTime}" pattern="yyyy-MM-dd"/>">
                        </td>
                    </tr>
                    <tr>
                        <td class="one">费用结算</td>
                        <td><input type="text" name="carCheckId" class="two" value="${requestScope.carIn.carInMoney}">
                        </td>
                    </tr>
                    <tr>
                        <td class="one">用车反馈</td>
                        <td><input type="text" name="carInFeedback" class="two"
                                   value="${requestScope.carIn.carInFeedback}">
                        </td>
                    </tr>
                </table>
            </c:if>

            <h5>检查单信息</h5>
            <c:if test="${empty carIn.carCheck}">
                <font style="color: red">没有检查单信息</font>
            </c:if>
            <c:if test="${not empty carIn.carCheck}">
                <table>
                    <tr>
                        <td class="one">检查单编号</td>
                        <td><input type="text" name="carCheckId" class="two"
                                   value="${requestScope.carIn.carCheck.carCheckId}"></td>
                    </tr>

                    <tr>
                        <td class="one">状态时间</td>
                        <td><input type="date" name="carCheckTime" class="two"
                                   value="<fmt:formatDate value="${requestScope.carIn.carCheck.carCheckTime}"
                                    pattern= "yyyy-MM-dd"/>"></td>
                    </tr>
                    <tr>
                        <td class="one">状态描述</td>
                        <td><input type="text" name="carDescribe" class="two"
                                   value="${requestScope.carIn.carCheck.carDescribe}"></td>
                    </tr>
                </table>
            </c:if>
            <h5>车辆信息</h5>
            <c:if test="${empty carIn.car}">
                <font style="color: red">没有车辆信息数据</font>
            </c:if>
            <c:if test="${not empty carIn.car}">
                <table>
                    <tr>
                        <td class="one">车辆编号</td>
                        <td><input type="text" name="carId" class="two"
                                   value="${requestScope.carIn.car.carId}"></td>
                    </tr>
                    <tr>
                        <td class="one">车辆品牌</td>
                        <td><input type="text" name="carLogo" class="two"
                                   value="${requestScope.carIn.car.carLogo}"></td>
                    </tr>
                    <tr>
                        <td class="one">车辆状态</td>
                        <td>
                        <td><%--1 未租，2 已租,3 不可以--%>
                            <select name="carStatus">
                                <c:if test="${requestScope.carIn.car.carStatus==1}">
                                    <option value="1" selected="selected">未租</option>
                                    <option value="2">已租</option>
                                    <option value="3">不可以</option>
                                </c:if>
                                <c:if test="${requestScope.carIn.car.carStatus==2}">
                                    <option value="1">未租</option>
                                    <option value="2" selected="selected">已租</option>
                                    <option value="3">不可以</option>
                                </c:if>
                                <c:if test="${requestScope.carIn.car.carStatus==3}">
                                    <option value="1">未租</option>
                                    <option value="2">已租</option>
                                    <option value="3" selected="selected">不可以</option>
                                </c:if>

                            </select>
                        </td>
                        </td>
                    </tr>
                    <tr>
                        <td class="one">车辆照片</td>
                        <td>
                            <div id="imgDiv" style="display:block; width: 40px; height: 50px;">
                                <img src="${requestScope.carIn.car.carPhoto}" width="100px" height="100px">
                            </div>
                        </td>
                    </tr>
                </table>
            </c:if>

            <h5>签单员工信息</h5>
            <c:if test="${empty carIn.user}">
                <font style="color: red">没有签单员工数据</font>
            </c:if>

            <c:if test="${not empty carIn.user}">

                <table>
                    <tr>
                        <td class="one">用户编号</td>
                        <td><input type="text" name="userId" class="two"
                            value="${requestScope.carIn.user.userId}" ></td>
                    </tr>
                    <tr>
                        <td class="one">用户姓名</td>
                        <td><input type="text" name="userName" class="two"
                           value="${requestScope.carIn.user.userName}" ></td>
                    </tr>
                    <tr>
                        <td class="one">用户部门</td>
                        <td><input type="text" name="userName" class="two"
                            value="${requestScope.carIn.user.departmentId}"></td>
                    </tr>
                    <tr>
                        <td class="one">用户照片</td>
                        <td>
                            <div style="display:block; width: 40px; height: 50px;">
                                <img src="${requestScope.carIn.user.userPhoto}" width="100px" height="100px">
                            </div>
                        </td>
                    </tr>
                </table>
            </c:if>

            <tr>
                <%-- <td>
                     <input type="submit" value="提交" class="btn btn-success">
                 </td>--%>
                <td>
                    <input type="reset" value="返回" class="btn btn-default" onclick="myclose()">
                    <script type="text/javascript">
                        function myclose() {
                            window.history.go(-1)
                        }
                    </script>
                </td>
            </tr>

        </form>
    </div>
</div>

</body>
</html>
